import request from "@/utils/request";
import requestTwo from "@/utils/requestTwo";

//添加用例
export function addCase(data) {
    return request({
        url: '/cases/create',
        method: 'post',
        data: data
    })

}

//获取接口用例
export function getCase(interfaceId, id, pageIndex, pageSize) {
    return request({
        url: '/cases/list',
        method: 'get',
        params: {
            interfaceId,
            id,
            pageIndex,
            pageSize
        }

    })
}


//删除用例
export function deleteCase(id) {
    return request({
        url: `/cases/delete/${id}`,
        method: 'delete',
    })

}

//更新用例
export function updateCase(data) {
    return request({
        url: '/cases/update',
        method: 'post',
        data: data
    })

}

//调试用例
export function executeDebugCase(params) {
    return requestTwo({
        url: '/aitest/execute/debug/executed',
        method: 'post',
        data: params
    })
}